Exposed Computation to Serialize a Return of a Nest of Collections
OIPA allows Math sections to build a data structure of key/value pairs. The value of any key may itself contain a structure of key/value pairs. Since this complex data structure can be constructed in Math, OIPA will include them in the ability to serialize return messages to external systems.
The system allows Math to place a collection of key/value pairs into the value of a "parent" key. When this math is the source of output from any web service, the system will now serialize the nested structure. The serialized XML for each collection in a nest will take on the format of a single level collection. The order of the key/value pairs are unaltered and there will be no limit to the number of nesting levels supported by this feature.
For example, an external request may ask for a collection of policies that each contains one or more segments, each segment contains one or more roles, each role contains one or more clients and each client having one or more addresses. All this data would be contained in one data structure with collections nested within collections. Affected web services are:
- ExposedComputation
- FileReceived
- ValuePolicy
OIPA is not modified by this feature to accept, as input, XML representing nested collections.
| Input |
|---|
Level 1 collection name 1a / value 1a name 1b / value 1b name 1c / Level 2 collection name 2a / value 2a name 2b / Level 3 collection name 3a / Level 4 collection name 4a / value 4a name 4b / value 4b name 4c / value 4c name 4d / Level 5 collection name 5a / value 5a name 5b / value 5b name 5c / value 5c name 4e / Level 5 collection name 5d / value 5d name 5e / value 5e name 3b / Level 4 collection name 4a / value 4a name 4b / value 4b name 4c / Level 5 collection name 5a / value 5a name 5b / value 5b name 5c / value 5c name 2c / Level 3 collection name 3c / value 3c name 3d / value 3d name 2d / Level 3 collection name 3e / Level 4 collection name 4d / value 4d name 1d / Level 2 collection etc. |
Proposed Output of Abstract Example
| Output |
|---|
<Level_1_Collection> <Item INDEX="1"> <Name>1a</Name> <Value>1a</Value> </Item> <Item INDEX="2"> <Name>1b</Name> <Value>1b</Value> </Item> <Item INDEX="3"> <Name>1c</Name> <Value> <Item INDEX="1"> <Name>2a</Name> <Value>2a</Value> </Item> <Item INDEX="2"> <Name>2b</Name> <Value> <Item INDEX="1"> <Name>3a</Name> <Value> <Item INDEX="1"> <Name>4a</Name> <Value>4a</Value> </Item> <Item INDEX="2"> <Name>4b</Name> <Value>4b</Value> </Item> <Item INDEX="3"> <Name>4c</Name> <Value>4c</Value> </Item> <Item INDEX="4"> <Name>4d</Name> <Value> <Item INDEX="1"> <Name>5a</Name> <Value>5a</Value> </Item> <Item INDEX="2"> <Name>5b</Name> <Value>5b</Value> </Item> <Item INDEX="3"> <Name>5c</Name> <Value>5c</Value> </Item> </Value> </Item> <Item INDEX="5"> <Name>4e</Name> <Value> <Item INDEX="1"> <Name>5d</Name> <Value>5d</Value> </Item> <Item INDEX="2"> <Name>5e</Name> <Value>5e</Value> </Item> </Value> </Item> </Value> </Item> <Item INDEX="2"> <Name>3b</Name> <Value> <Item INDEX="1"> <Name>4a</Name> <Value>4a</Value> </Item> <Item INDEX="2"> <Name>4b</Name> <Value>4b</Value> </Item> <Item INDEX="3"> <Name>4c</Name> <Value> <Item INDEX="1"> <Name>5a</Name> <Value>5a</Value> </Item> <Item INDEX="2"> <Name>5b</Name> <Value>5b</Value> </Item> <Item INDEX="3"> <Name>5c</Name> <Value>5c</Value> </Item> </Value> </Item> </Value> </Item> </Value> </Item> <Item INDEX="3"> <Name>2c</Name> <Value> <Item INDEX="1"> <Name>3c</Name> <Value>3c</Value> </Item> <Item INDEX="2"> <Name>3d</Name> <Value>3d</Value> </Item> </Value> </Item> <Item INDEX="4"> <Name>2d</Name> <Value> <Item INDEX="1"> <Name>3e</Name> <Value> <Item INDEX="1"> <Name>4d</Name> <Value>4d</Value> </Item> </Value> </Item> </Value> </Item> </Value> </Item> <Item INDEX="4"> ... </Item> </Level_1_Collection> |